package com.hibernate.hrm.service.position;

import com.hibernate.hrm.entity.Department;
import com.hibernate.hrm.entity.Position;
import com.hibernate.hrm.entity.Role;
import com.hibernate.hrm.entity.User;
import com.hibernate.hrm.entity.dto.position.PositionAddDTO;
import com.hibernate.hrm.entity.dto.position.PositionEditDTO;
import com.hibernate.hrm.entity.dto.position.PositionListDTO;
import com.hibernate.hrm.entity.dto.position.PositionQueryDTO;
import jakarta.persistence.EntityNotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.security.access.AccessDeniedException;

import java.util.List;

public interface PositionService {
    Page<PositionListDTO> getPositionList(PositionQueryDTO queryDTO, User currentUser);
    List<Department> getAccessibleDepartments(User currentUser);
    void togglePositionStatus(Integer positionId, User operator);
    List<Position> getAllPositionsForExport(User currentUser);
    Position getPositionById(Integer positionId, User currentUser) throws EntityNotFoundException, AccessDeniedException;
    Position getPositionForEdit(Integer positionId);
    List<Department> getAllActiveDepartments();
    List<Role> getAllRoles();
    void updatePosition(Integer positionId, PositionEditDTO editDTO, User operator);
    void addPosition(PositionAddDTO positionAddDTO, User operator);
    void deletePosition(Integer positionId, User operator) throws Exception;
}
